/*
The MIT License (MIT)
Copyright (c) 2013 Dalvik Boss dalvikboss@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// $ANTLR 3.4 C:\\devel\\sidl\\sidl\\grammer\\Sidl.g 2013-01-30 15:26:24
package sidl;

import java.util.HashMap;

import org.antlr.runtime.BitSet;
import org.antlr.runtime.EarlyExitException;
import org.antlr.runtime.MismatchedSetException;
import org.antlr.runtime.NoViableAltException;
import org.antlr.runtime.Parser;
import org.antlr.runtime.ParserRuleReturnScope;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.RecognizerSharedState;
import org.antlr.runtime.Token;
import org.antlr.runtime.TokenStream;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class SidlParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "CHAR", "COMMENT", "ESC_SEQ", "HEXINT", "HEX_DIGIT", "IDT", "INT", "OCTAL_ESC", "STRING", "UNICODE_ESC", "WS", "'('", "')'", "'*'", "','", "'.'", "';'", "'='", "'@options'", "'['", "']'", "'class'", "'const'", "'import'", "'interface'", "'out'", "'package'", "'void'", "'{'", "'}'"
    };

    public static final int EOF=-1;
    public static final int T__15=15;
    public static final int T__16=16;
    public static final int T__17=17;
    public static final int T__18=18;
    public static final int T__19=19;
    public static final int T__20=20;
    public static final int T__21=21;
    public static final int T__22=22;
    public static final int T__23=23;
    public static final int T__24=24;
    public static final int T__25=25;
    public static final int T__26=26;
    public static final int T__27=27;
    public static final int T__28=28;
    public static final int T__29=29;
    public static final int T__30=30;
    public static final int T__31=31;
    public static final int T__32=32;
    public static final int T__33=33;
    public static final int CHAR=4;
    public static final int COMMENT=5;
    public static final int ESC_SEQ=6;
    public static final int HEXINT=7;
    public static final int HEX_DIGIT=8;
    public static final int IDT=9;
    public static final int INT=10;
    public static final int OCTAL_ESC=11;
    public static final int STRING=12;
    public static final int UNICODE_ESC=13;
    public static final int WS=14;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


    public SidlParser(TokenStream input) {
        this(input, new RecognizerSharedState());
    }
    public SidlParser(TokenStream input, RecognizerSharedState state) {
        super(input, state);
        this.state.ruleMemo = new HashMap[45+1];
         

    }

    public String[] getTokenNames() { return SidlParser.tokenNames; }
    public String getGrammarFileName() { return "C:\\devel\\sidl\\sidl\\grammer\\Sidl.g"; }


    	public Doc doc = new Doc();
    	private Inf currentInf = null;



    // $ANTLR start "compilationUnit"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:14:1: compilationUnit : ( packageDeclaration )? ( importDeclaration )* ( optionDeclaration )* interfaceDeclaration ( clazzOrInterfaceDeclaration )* ;
    public final void compilationUnit() throws RecognitionException {
        int compilationUnit_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 1) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:15:2: ( ( packageDeclaration )? ( importDeclaration )* ( optionDeclaration )* interfaceDeclaration ( clazzOrInterfaceDeclaration )* )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:16:2: ( packageDeclaration )? ( importDeclaration )* ( optionDeclaration )* interfaceDeclaration ( clazzOrInterfaceDeclaration )*
            {
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:16:2: ( packageDeclaration )?
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0==30) ) {
                alt1=1;
            }
            switch (alt1) {
                case 1 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:16:3: packageDeclaration
                    {
                    pushFollow(FOLLOW_packageDeclaration_in_compilationUnit87);
                    packageDeclaration();

                    state._fsp--;
                    if (state.failed) return ;

                    }
                    break;

            }


            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:17:2: ( importDeclaration )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0==27) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:17:3: importDeclaration
            	    {
            	    pushFollow(FOLLOW_importDeclaration_in_compilationUnit100);
            	    importDeclaration();

            	    state._fsp--;
            	    if (state.failed) return ;

            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:18:2: ( optionDeclaration )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==22) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:18:3: optionDeclaration
            	    {
            	    pushFollow(FOLLOW_optionDeclaration_in_compilationUnit106);
            	    optionDeclaration();

            	    state._fsp--;
            	    if (state.failed) return ;

            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);


            pushFollow(FOLLOW_interfaceDeclaration_in_compilationUnit112);
            interfaceDeclaration();

            state._fsp--;
            if (state.failed) return ;

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:20:3: ( clazzOrInterfaceDeclaration )*
            loop4:
            do {
                int alt4=2;
                int LA4_0 = input.LA(1);

                if ( (LA4_0==25||LA4_0==28) ) {
                    alt4=1;
                }


                switch (alt4) {
            	case 1 :
            	    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:20:4: clazzOrInterfaceDeclaration
            	    {
            	    pushFollow(FOLLOW_clazzOrInterfaceDeclaration_in_compilationUnit117);
            	    clazzOrInterfaceDeclaration();

            	    state._fsp--;
            	    if (state.failed) return ;

            	    }
            	    break;

            	default :
            	    break loop4;
                }
            } while (true);


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 1, compilationUnit_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "compilationUnit"



    // $ANTLR start "packageDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:79:2: packageDeclaration : 'package' ( packageNameDeclaration ) ';' ;
    public final void packageDeclaration() throws RecognitionException {
        int packageDeclaration_StartIndex = input.index();

        SidlParser.packageNameDeclaration_return packageNameDeclaration1 =null;


        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 2) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:79:21: ( 'package' ( packageNameDeclaration ) ';' )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:80:3: 'package' ( packageNameDeclaration ) ';'
            {
            match(input,30,FOLLOW_30_in_packageDeclaration597); if (state.failed) return ;

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:80:13: ( packageNameDeclaration )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:80:14: packageNameDeclaration
            {
            pushFollow(FOLLOW_packageNameDeclaration_in_packageDeclaration600);
            packageNameDeclaration1=packageNameDeclaration();

            state._fsp--;
            if (state.failed) return ;

            }


            match(input,20,FOLLOW_20_in_packageDeclaration604); if (state.failed) return ;

            if ( state.backtracking==0 ) {doc.packageName = (packageNameDeclaration1!=null?input.toString(packageNameDeclaration1.start,packageNameDeclaration1.stop):null);}

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 2, packageDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "packageDeclaration"


    public static class packageNameDeclaration_return extends ParserRuleReturnScope {
    };


    // $ANTLR start "packageNameDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:84:1: packageNameDeclaration : IDT ( . IDT )* ;
    public final SidlParser.packageNameDeclaration_return packageNameDeclaration() throws RecognitionException {
        SidlParser.packageNameDeclaration_return retval = new SidlParser.packageNameDeclaration_return();
        retval.start = input.LT(1);

        int packageNameDeclaration_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 3) ) { return retval; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:85:2: ( IDT ( . IDT )* )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:86:2: IDT ( . IDT )*
            {
            match(input,IDT,FOLLOW_IDT_in_packageNameDeclaration629); if (state.failed) return retval;

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:86:6: ( . IDT )*
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( (LA5_0==20) ) {
                    int LA5_1 = input.LA(2);

                    if ( (LA5_1==IDT) ) {
                        alt5=1;
                    }


                }
                else if ( ((LA5_0 >= CHAR && LA5_0 <= 19)||(LA5_0 >= 21 && LA5_0 <= 33)) ) {
                    alt5=1;
                }


                switch (alt5) {
            	case 1 :
            	    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:86:7: . IDT
            	    {
            	    matchAny(input); if (state.failed) return retval;

            	    match(input,IDT,FOLLOW_IDT_in_packageNameDeclaration633); if (state.failed) return retval;

            	    }
            	    break;

            	default :
            	    break loop5;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 3, packageNameDeclaration_StartIndex); }

        }
        return retval;
    }
    // $ANTLR end "packageNameDeclaration"



    // $ANTLR start "importDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:90:1: importDeclaration : ( 'import' IDT '.' '*' ';' | 'import' IDT ( '.' IDT )+ ( '.' '*' )? ';' );
    public final void importDeclaration() throws RecognitionException {
        int importDeclaration_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 4) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:90:20: ( 'import' IDT '.' '*' ';' | 'import' IDT ( '.' IDT )+ ( '.' '*' )? ';' )
            int alt8=2;
            int LA8_0 = input.LA(1);

            if ( (LA8_0==27) ) {
                int LA8_1 = input.LA(2);

                if ( (LA8_1==IDT) ) {
                    int LA8_2 = input.LA(3);

                    if ( (LA8_2==19) ) {
                        int LA8_3 = input.LA(4);

                        if ( (LA8_3==17) ) {
                            alt8=1;
                        }
                        else if ( (LA8_3==IDT) ) {
                            alt8=2;
                        }
                        else {
                            if (state.backtracking>0) {state.failed=true; return ;}
                            NoViableAltException nvae =
                                new NoViableAltException("", 8, 3, input);

                            throw nvae;

                        }
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return ;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 8, 2, input);

                        throw nvae;

                    }
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return ;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 8, 1, input);

                    throw nvae;

                }
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                NoViableAltException nvae =
                    new NoViableAltException("", 8, 0, input);

                throw nvae;

            }
            switch (alt8) {
                case 1 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:91:2: 'import' IDT '.' '*' ';'
                    {
                    match(input,27,FOLLOW_27_in_importDeclaration656); if (state.failed) return ;

                    match(input,IDT,FOLLOW_IDT_in_importDeclaration666); if (state.failed) return ;

                    match(input,19,FOLLOW_19_in_importDeclaration668); if (state.failed) return ;

                    match(input,17,FOLLOW_17_in_importDeclaration670); if (state.failed) return ;

                    match(input,20,FOLLOW_20_in_importDeclaration672); if (state.failed) return ;

                    }
                    break;
                case 2 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:92:6: 'import' IDT ( '.' IDT )+ ( '.' '*' )? ';'
                    {
                    match(input,27,FOLLOW_27_in_importDeclaration686); if (state.failed) return ;

                    match(input,IDT,FOLLOW_IDT_in_importDeclaration697); if (state.failed) return ;

                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:93:14: ( '.' IDT )+
                    int cnt6=0;
                    loop6:
                    do {
                        int alt6=2;
                        int LA6_0 = input.LA(1);

                        if ( (LA6_0==19) ) {
                            int LA6_1 = input.LA(2);

                            if ( (LA6_1==IDT) ) {
                                alt6=1;
                            }


                        }


                        switch (alt6) {
                    	case 1 :
                    	    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:93:15: '.' IDT
                    	    {
                    	    match(input,19,FOLLOW_19_in_importDeclaration701); if (state.failed) return ;

                    	    match(input,IDT,FOLLOW_IDT_in_importDeclaration703); if (state.failed) return ;

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt6 >= 1 ) break loop6;
                    	    if (state.backtracking>0) {state.failed=true; return ;}
                                EarlyExitException eee =
                                    new EarlyExitException(6, input);
                                throw eee;
                        }
                        cnt6++;
                    } while (true);


                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:93:27: ( '.' '*' )?
                    int alt7=2;
                    int LA7_0 = input.LA(1);

                    if ( (LA7_0==19) ) {
                        alt7=1;
                    }
                    switch (alt7) {
                        case 1 :
                            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:93:28: '.' '*'
                            {
                            match(input,19,FOLLOW_19_in_importDeclaration710); if (state.failed) return ;

                            match(input,17,FOLLOW_17_in_importDeclaration712); if (state.failed) return ;

                            }
                            break;

                    }


                    match(input,20,FOLLOW_20_in_importDeclaration718); if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 4, importDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "importDeclaration"



    // $ANTLR start "clazzOrInterfaceDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:97:1: clazzOrInterfaceDeclaration : ( clazzDeclaration | interfaceDeclaration );
    public final void clazzOrInterfaceDeclaration() throws RecognitionException {
        int clazzOrInterfaceDeclaration_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 5) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:98:6: ( clazzDeclaration | interfaceDeclaration )
            int alt9=2;
            int LA9_0 = input.LA(1);

            if ( (LA9_0==25) ) {
                alt9=1;
            }
            else if ( (LA9_0==28) ) {
                alt9=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                NoViableAltException nvae =
                    new NoViableAltException("", 9, 0, input);

                throw nvae;

            }
            switch (alt9) {
                case 1 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:99:6: clazzDeclaration
                    {
                    pushFollow(FOLLOW_clazzDeclaration_in_clazzOrInterfaceDeclaration751);
                    clazzDeclaration();

                    state._fsp--;
                    if (state.failed) return ;

                    }
                    break;
                case 2 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:100:7: interfaceDeclaration
                    {
                    pushFollow(FOLLOW_interfaceDeclaration_in_clazzOrInterfaceDeclaration759);
                    interfaceDeclaration();

                    state._fsp--;
                    if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 5, clazzOrInterfaceDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "clazzOrInterfaceDeclaration"



    // $ANTLR start "clazzDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:104:1: clazzDeclaration : 'class' IDT clazzBody ;
    public final void clazzDeclaration() throws RecognitionException {
        int clazzDeclaration_StartIndex = input.index();

        Token IDT2=null;

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 6) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:105:6: ( 'class' IDT clazzBody )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:105:8: 'class' IDT clazzBody
            {
            match(input,25,FOLLOW_25_in_clazzDeclaration779); if (state.failed) return ;

            IDT2=(Token)match(input,IDT,FOLLOW_IDT_in_clazzDeclaration781); if (state.failed) return ;

            if ( state.backtracking==0 ) {
            	    doc.clazzes.addLast(new Clazz());
            	    doc.clazzes.getLast().name = (IDT2!=null?IDT2.getText():null); 
            	    }

            pushFollow(FOLLOW_clazzBody_in_clazzDeclaration810);
            clazzBody();

            state._fsp--;
            if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 6, clazzDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "clazzDeclaration"



    // $ANTLR start "clazzBody"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:115:1: clazzBody : '{' ( clazzBodyDeclaration )* '}' ;
    public final void clazzBody() throws RecognitionException {
        int clazzBody_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 7) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:116:5: ( '{' ( clazzBodyDeclaration )* '}' )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:116:9: '{' ( clazzBodyDeclaration )* '}'
            {
            match(input,32,FOLLOW_32_in_clazzBody833); if (state.failed) return ;

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:117:9: ( clazzBodyDeclaration )*
            loop10:
            do {
                int alt10=2;
                int LA10_0 = input.LA(1);

                if ( (LA10_0==IDT||LA10_0==20) ) {
                    alt10=1;
                }


                switch (alt10) {
            	case 1 :
            	    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:117:10: clazzBodyDeclaration
            	    {
            	    pushFollow(FOLLOW_clazzBodyDeclaration_in_clazzBody845);
            	    clazzBodyDeclaration();

            	    state._fsp--;
            	    if (state.failed) return ;

            	    }
            	    break;

            	default :
            	    break loop10;
                }
            } while (true);


            match(input,33,FOLLOW_33_in_clazzBody867); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 7, clazzBody_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "clazzBody"



    // $ANTLR start "clazzBodyDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:123:1: clazzBodyDeclaration : ( ';' | memberDecl );
    public final void clazzBodyDeclaration() throws RecognitionException {
        int clazzBodyDeclaration_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 8) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:124:5: ( ';' | memberDecl )
            int alt11=2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0==20) ) {
                alt11=1;
            }
            else if ( (LA11_0==IDT) ) {
                alt11=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                NoViableAltException nvae =
                    new NoViableAltException("", 11, 0, input);

                throw nvae;

            }
            switch (alt11) {
                case 1 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:124:9: ';'
                    {
                    match(input,20,FOLLOW_20_in_clazzBodyDeclaration888); if (state.failed) return ;

                    }
                    break;
                case 2 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:125:9: memberDecl
                    {
                    pushFollow(FOLLOW_memberDecl_in_clazzBodyDeclaration898);
                    memberDecl();

                    state._fsp--;
                    if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 8, clazzBodyDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "clazzBodyDeclaration"



    // $ANTLR start "memberDecl"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:128:1: memberDecl : fieldDeclaration ;
    public final void memberDecl() throws RecognitionException {
        int memberDecl_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 9) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:129:5: ( fieldDeclaration )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:129:10: fieldDeclaration
            {
            pushFollow(FOLLOW_fieldDeclaration_in_memberDecl919);
            fieldDeclaration();

            state._fsp--;
            if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 9, memberDecl_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "memberDecl"



    // $ANTLR start "fieldDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:132:1: fieldDeclaration : type IDT ';' ;
    public final void fieldDeclaration() throws RecognitionException {
        int fieldDeclaration_StartIndex = input.index();

        Token IDT4=null;
        SidlParser.type_return type3 =null;


        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 10) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:133:5: ( type IDT ';' )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:134:9: type IDT ';'
            {
            pushFollow(FOLLOW_type_in_fieldDeclaration948);
            type3=type();

            state._fsp--;
            if (state.failed) return ;

            IDT4=(Token)match(input,IDT,FOLLOW_IDT_in_fieldDeclaration950); if (state.failed) return ;

            match(input,20,FOLLOW_20_in_fieldDeclaration952); if (state.failed) return ;

            if ( state.backtracking==0 ) {doc.clazzes.getLast().fields.add(new Field(new Type((type3!=null?input.toString(type3.start,type3.stop):null)), (IDT4!=null?IDT4.getText():null)));}

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 10, fieldDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "fieldDeclaration"



    // $ANTLR start "interfaceDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:137:1: interfaceDeclaration : 'interface' IDT interfaceBody ;
    public final void interfaceDeclaration() throws RecognitionException {
        int interfaceDeclaration_StartIndex = input.index();

        Token IDT5=null;

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:138:5: ( 'interface' IDT interfaceBody )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:138:9: 'interface' IDT interfaceBody
            {
            match(input,28,FOLLOW_28_in_interfaceDeclaration985); if (state.failed) return ;

            IDT5=(Token)match(input,IDT,FOLLOW_IDT_in_interfaceDeclaration987); if (state.failed) return ;

            if ( state.backtracking==0 ) {
                                           currentInf = new Inf();
                                           doc.infs.addLast(currentInf);
                                           currentInf.name = (IDT5!=null?IDT5.getText():null);
                                          }

            pushFollow(FOLLOW_interfaceBody_in_interfaceDeclaration1029);
            interfaceBody();

            state._fsp--;
            if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 11, interfaceDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "interfaceDeclaration"



    // $ANTLR start "interfaceBody"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:148:1: interfaceBody : '{' ( interfaceBodyDeclaration )* '}' ;
    public final void interfaceBody() throws RecognitionException {
        int interfaceBody_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 12) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:149:5: ( '{' ( interfaceBodyDeclaration )* '}' )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:149:9: '{' ( interfaceBodyDeclaration )* '}'
            {
            match(input,32,FOLLOW_32_in_interfaceBody1059); if (state.failed) return ;

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:150:9: ( interfaceBodyDeclaration )*
            loop12:
            do {
                int alt12=2;
                int LA12_0 = input.LA(1);

                if ( (LA12_0==IDT||LA12_0==20||LA12_0==26||LA12_0==31) ) {
                    alt12=1;
                }


                switch (alt12) {
            	case 1 :
            	    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:150:10: interfaceBodyDeclaration
            	    {
            	    pushFollow(FOLLOW_interfaceBodyDeclaration_in_interfaceBody1071);
            	    interfaceBodyDeclaration();

            	    state._fsp--;
            	    if (state.failed) return ;

            	    }
            	    break;

            	default :
            	    break loop12;
                }
            } while (true);


            match(input,33,FOLLOW_33_in_interfaceBody1093); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 12, interfaceBody_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "interfaceBody"



    // $ANTLR start "interfaceBodyDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:155:1: interfaceBodyDeclaration : ( interfaceConstDeclaration | interfaceMethodDeclaration | ';' );
    public final void interfaceBodyDeclaration() throws RecognitionException {
        int interfaceBodyDeclaration_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 13) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:156:5: ( interfaceConstDeclaration | interfaceMethodDeclaration | ';' )
            int alt13=3;
            switch ( input.LA(1) ) {
            case 26:
                {
                alt13=1;
                }
                break;
            case IDT:
            case 31:
                {
                alt13=2;
                }
                break;
            case 20:
                {
                alt13=3;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return ;}
                NoViableAltException nvae =
                    new NoViableAltException("", 13, 0, input);

                throw nvae;

            }

            switch (alt13) {
                case 1 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:157:5: interfaceConstDeclaration
                    {
                    pushFollow(FOLLOW_interfaceConstDeclaration_in_interfaceBodyDeclaration1119);
                    interfaceConstDeclaration();

                    state._fsp--;
                    if (state.failed) return ;

                    }
                    break;
                case 2 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:158:7: interfaceMethodDeclaration
                    {
                    pushFollow(FOLLOW_interfaceMethodDeclaration_in_interfaceBodyDeclaration1127);
                    interfaceMethodDeclaration();

                    state._fsp--;
                    if (state.failed) return ;

                    }
                    break;
                case 3 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:159:9: ';'
                    {
                    match(input,20,FOLLOW_20_in_interfaceBodyDeclaration1137); if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 13, interfaceBodyDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "interfaceBodyDeclaration"



    // $ANTLR start "interfaceConstDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:162:1: interfaceConstDeclaration : 'const' IDT '=' number ';' ;
    public final void interfaceConstDeclaration() throws RecognitionException {
        int interfaceConstDeclaration_StartIndex = input.index();

        Token IDT6=null;
        SidlParser.number_return number7 =null;


        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:163:2: ( 'const' IDT '=' number ';' )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:163:4: 'const' IDT '=' number ';'
            {
            match(input,26,FOLLOW_26_in_interfaceConstDeclaration1157); if (state.failed) return ;

            IDT6=(Token)match(input,IDT,FOLLOW_IDT_in_interfaceConstDeclaration1159); if (state.failed) return ;

            match(input,21,FOLLOW_21_in_interfaceConstDeclaration1161); if (state.failed) return ;

            pushFollow(FOLLOW_number_in_interfaceConstDeclaration1163);
            number7=number();

            state._fsp--;
            if (state.failed) return ;

            match(input,20,FOLLOW_20_in_interfaceConstDeclaration1165); if (state.failed) return ;

            if ( state.backtracking==0 ) {currentInf.consts.add(new Const((IDT6!=null?IDT6.getText():null), (number7!=null?input.toString(number7.start,number7.stop):null)));}

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 14, interfaceConstDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "interfaceConstDeclaration"


    public static class number_return extends ParserRuleReturnScope {
    };


    // $ANTLR start "number"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:167:1: number : ( INT | HEXINT );
    public final SidlParser.number_return number() throws RecognitionException {
        SidlParser.number_return retval = new SidlParser.number_return();
        retval.start = input.LT(1);

        int number_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return retval; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:167:8: ( INT | HEXINT )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:
            {
            if ( input.LA(1)==HEXINT||input.LA(1)==INT ) {
                input.consume();
                state.errorRecovery=false;
                state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

            retval.stop = input.LT(-1);


        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 15, number_StartIndex); }

        }
        return retval;
    }
    // $ANTLR end "number"



    // $ANTLR start "interfaceMethodDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:175:1: interfaceMethodDeclaration : ( type | 'void' ) IDT formalParameters ';' ;
    public final void interfaceMethodDeclaration() throws RecognitionException {
        int interfaceMethodDeclaration_StartIndex = input.index();

        Token IDT9=null;
        SidlParser.type_return type8 =null;


        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 16) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:176:5: ( ( type | 'void' ) IDT formalParameters ';' )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:176:9: ( type | 'void' ) IDT formalParameters ';'
            {
            if ( state.backtracking==0 ) {currentInf.funcs.add(new Func());}

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:177:9: ( type | 'void' )
            int alt14=2;
            int LA14_0 = input.LA(1);

            if ( (LA14_0==IDT) ) {
                alt14=1;
            }
            else if ( (LA14_0==31) ) {
                alt14=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                NoViableAltException nvae =
                    new NoViableAltException("", 14, 0, input);

                throw nvae;

            }
            switch (alt14) {
                case 1 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:177:10: type
                    {
                    pushFollow(FOLLOW_type_in_interfaceMethodDeclaration1227);
                    type8=type();

                    state._fsp--;
                    if (state.failed) return ;

                    if ( state.backtracking==0 ) {currentInf.funcs.getLast().rtype = new Type((type8!=null?input.toString(type8.start,type8.stop):null));}

                    }
                    break;
                case 2 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:178:10: 'void'
                    {
                    match(input,31,FOLLOW_31_in_interfaceMethodDeclaration1240); if (state.failed) return ;

                    if ( state.backtracking==0 ) {currentInf.funcs.getLast().rtype = new Type("void");}

                    }
                    break;

            }


            IDT9=(Token)match(input,IDT,FOLLOW_IDT_in_interfaceMethodDeclaration1261); if (state.failed) return ;

            if ( state.backtracking==0 ) {currentInf.funcs.getLast().name = (IDT9!=null?IDT9.getText():null);}

            pushFollow(FOLLOW_formalParameters_in_interfaceMethodDeclaration1274);
            formalParameters();

            state._fsp--;
            if (state.failed) return ;

            match(input,20,FOLLOW_20_in_interfaceMethodDeclaration1285); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 16, interfaceMethodDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "interfaceMethodDeclaration"



    // $ANTLR start "formalParameters"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:186:1: formalParameters : '(' ( formalParameterDecls )? ')' ;
    public final void formalParameters() throws RecognitionException {
        int formalParameters_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 17) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:187:5: ( '(' ( formalParameterDecls )? ')' )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:187:8: '(' ( formalParameterDecls )? ')'
            {
            match(input,15,FOLLOW_15_in_formalParameters1309); if (state.failed) return ;

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:188:5: ( formalParameterDecls )?
            int alt15=2;
            int LA15_0 = input.LA(1);

            if ( (LA15_0==IDT||LA15_0==29) ) {
                alt15=1;
            }
            switch (alt15) {
                case 1 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:188:6: formalParameterDecls
                    {
                    pushFollow(FOLLOW_formalParameterDecls_in_formalParameters1316);
                    formalParameterDecls();

                    state._fsp--;
                    if (state.failed) return ;

                    }
                    break;

            }


            match(input,16,FOLLOW_16_in_formalParameters1325); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 17, formalParameters_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "formalParameters"



    // $ANTLR start "formalParameterDecls"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:192:1: formalParameterDecls : normalParameterDecl ( ',' normalParameterDecl )* ;
    public final void formalParameterDecls() throws RecognitionException {
        int formalParameterDecls_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 18) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:193:5: ( normalParameterDecl ( ',' normalParameterDecl )* )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:193:9: normalParameterDecl ( ',' normalParameterDecl )*
            {
            pushFollow(FOLLOW_normalParameterDecl_in_formalParameterDecls1345);
            normalParameterDecl();

            state._fsp--;
            if (state.failed) return ;

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:194:9: ( ',' normalParameterDecl )*
            loop16:
            do {
                int alt16=2;
                int LA16_0 = input.LA(1);

                if ( (LA16_0==18) ) {
                    alt16=1;
                }


                switch (alt16) {
            	case 1 :
            	    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:194:10: ',' normalParameterDecl
            	    {
            	    match(input,18,FOLLOW_18_in_formalParameterDecls1356); if (state.failed) return ;

            	    pushFollow(FOLLOW_normalParameterDecl_in_formalParameterDecls1358);
            	    normalParameterDecl();

            	    state._fsp--;
            	    if (state.failed) return ;

            	    }
            	    break;

            	default :
            	    break loop16;
                }
            } while (true);


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 18, formalParameterDecls_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "formalParameterDecls"



    // $ANTLR start "normalParameterDecl"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:197:1: normalParameterDecl : ( 'out' )? type IDT ;
    public final void normalParameterDecl() throws RecognitionException {
        int normalParameterDecl_StartIndex = input.index();

        Token IDT11=null;
        SidlParser.type_return type10 =null;


        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 19) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:198:5: ( ( 'out' )? type IDT )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:198:9: ( 'out' )? type IDT
            {
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:198:9: ( 'out' )?
            int alt17=2;
            int LA17_0 = input.LA(1);

            if ( (LA17_0==29) ) {
                alt17=1;
            }
            switch (alt17) {
                case 1 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:198:10: 'out'
                    {
                    match(input,29,FOLLOW_29_in_normalParameterDecl1381); if (state.failed) return ;

                    }
                    break;

            }


            pushFollow(FOLLOW_type_in_normalParameterDecl1385);
            type10=type();

            state._fsp--;
            if (state.failed) return ;

            IDT11=(Token)match(input,IDT,FOLLOW_IDT_in_normalParameterDecl1387); if (state.failed) return ;

            if ( state.backtracking==0 ) { currentInf.funcs.getLast().params.addLast(new Param(new Type((type10!=null?input.toString(type10.start,type10.stop):null)),(IDT11!=null?IDT11.getText():null)));}

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 19, normalParameterDecl_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "normalParameterDecl"


    public static class type_return extends ParserRuleReturnScope {
    };


    // $ANTLR start "type"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:202:1: type : IDT ( '[' ']' )? ;
    public final SidlParser.type_return type() throws RecognitionException {
        SidlParser.type_return retval = new SidlParser.type_return();
        retval.start = input.LT(1);

        int type_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return retval; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:203:5: ( IDT ( '[' ']' )? )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:203:9: IDT ( '[' ']' )?
            {
            match(input,IDT,FOLLOW_IDT_in_type1415); if (state.failed) return retval;

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:203:13: ( '[' ']' )?
            int alt18=2;
            int LA18_0 = input.LA(1);

            if ( (LA18_0==23) ) {
                alt18=1;
            }
            switch (alt18) {
                case 1 :
                    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:203:14: '[' ']'
                    {
                    match(input,23,FOLLOW_23_in_type1418); if (state.failed) return retval;

                    match(input,24,FOLLOW_24_in_type1420); if (state.failed) return retval;

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 20, type_StartIndex); }

        }
        return retval;
    }
    // $ANTLR end "type"



    // $ANTLR start "optionDeclaration"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:206:1: optionDeclaration : '@options' '{' ( optionAttribute )* '}' ;
    public final void optionDeclaration() throws RecognitionException {
        int optionDeclaration_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 21) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:207:2: ( '@options' '{' ( optionAttribute )* '}' )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:208:2: '@options' '{' ( optionAttribute )* '}'
            {
            match(input,22,FOLLOW_22_in_optionDeclaration1439); if (state.failed) return ;

            match(input,32,FOLLOW_32_in_optionDeclaration1442); if (state.failed) return ;

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:209:2: ( optionAttribute )*
            loop19:
            do {
                int alt19=2;
                int LA19_0 = input.LA(1);

                if ( (LA19_0==IDT) ) {
                    alt19=1;
                }


                switch (alt19) {
            	case 1 :
            	    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:209:3: optionAttribute
            	    {
            	    pushFollow(FOLLOW_optionAttribute_in_optionDeclaration1447);
            	    optionAttribute();

            	    state._fsp--;
            	    if (state.failed) return ;

            	    }
            	    break;

            	default :
            	    break loop19;
                }
            } while (true);


            match(input,33,FOLLOW_33_in_optionDeclaration1452); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 21, optionDeclaration_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "optionDeclaration"



    // $ANTLR start "optionAttribute"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:213:1: optionAttribute : optionAttributeName '=' optionAttributeValue ';' ;
    public final void optionAttribute() throws RecognitionException {
        int optionAttribute_StartIndex = input.index();

        SidlParser.optionAttributeName_return optionAttributeName12 =null;

        SidlParser.optionAttributeValue_return optionAttributeValue13 =null;


        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 22) ) { return ; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:214:2: ( optionAttributeName '=' optionAttributeValue ';' )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:215:2: optionAttributeName '=' optionAttributeValue ';'
            {
            pushFollow(FOLLOW_optionAttributeName_in_optionAttribute1466);
            optionAttributeName12=optionAttributeName();

            state._fsp--;
            if (state.failed) return ;

            match(input,21,FOLLOW_21_in_optionAttribute1468); if (state.failed) return ;

            pushFollow(FOLLOW_optionAttributeValue_in_optionAttribute1470);
            optionAttributeValue13=optionAttributeValue();

            state._fsp--;
            if (state.failed) return ;

            match(input,20,FOLLOW_20_in_optionAttribute1472); if (state.failed) return ;

            if ( state.backtracking==0 ) {doc.options.put((optionAttributeName12!=null?input.toString(optionAttributeName12.start,optionAttributeName12.stop):null),(optionAttributeValue13!=null?input.toString(optionAttributeValue13.start,optionAttributeValue13.stop):null));}

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 22, optionAttribute_StartIndex); }

        }
        return ;
    }
    // $ANTLR end "optionAttribute"


    public static class optionAttributeName_return extends ParserRuleReturnScope {
    };


    // $ANTLR start "optionAttributeName"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:218:1: optionAttributeName : IDT ;
    public final SidlParser.optionAttributeName_return optionAttributeName() throws RecognitionException {
        SidlParser.optionAttributeName_return retval = new SidlParser.optionAttributeName_return();
        retval.start = input.LT(1);

        int optionAttributeName_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 23) ) { return retval; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:218:20: ( IDT )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:218:21: IDT
            {
            match(input,IDT,FOLLOW_IDT_in_optionAttributeName1482); if (state.failed) return retval;

            }

            retval.stop = input.LT(-1);


        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 23, optionAttributeName_StartIndex); }

        }
        return retval;
    }
    // $ANTLR end "optionAttributeName"


    public static class optionAttributeValue_return extends ParserRuleReturnScope {
    };


    // $ANTLR start "optionAttributeValue"
    // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:220:1: optionAttributeValue : IDT ;
    public final SidlParser.optionAttributeValue_return optionAttributeValue() throws RecognitionException {
        SidlParser.optionAttributeValue_return retval = new SidlParser.optionAttributeValue_return();
        retval.start = input.LT(1);

        int optionAttributeValue_StartIndex = input.index();

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 24) ) { return retval; }

            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:220:21: ( IDT )
            // C:\\devel\\sidl\\sidl\\grammer\\Sidl.g:220:22: IDT
            {
            match(input,IDT,FOLLOW_IDT_in_optionAttributeValue1488); if (state.failed) return retval;

            }

            retval.stop = input.LT(-1);


        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
            if ( state.backtracking>0 ) { memoize(input, 24, optionAttributeValue_StartIndex); }

        }
        return retval;
    }
    // $ANTLR end "optionAttributeValue"

    // Delegated rules


 

    public static final BitSet FOLLOW_packageDeclaration_in_compilationUnit87 = new BitSet(new long[]{0x0000000018400000L});
    public static final BitSet FOLLOW_importDeclaration_in_compilationUnit100 = new BitSet(new long[]{0x0000000018400000L});
    public static final BitSet FOLLOW_optionDeclaration_in_compilationUnit106 = new BitSet(new long[]{0x0000000010400000L});
    public static final BitSet FOLLOW_interfaceDeclaration_in_compilationUnit112 = new BitSet(new long[]{0x0000000012000002L});
    public static final BitSet FOLLOW_clazzOrInterfaceDeclaration_in_compilationUnit117 = new BitSet(new long[]{0x0000000012000002L});
    public static final BitSet FOLLOW_30_in_packageDeclaration597 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_packageNameDeclaration_in_packageDeclaration600 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_packageDeclaration604 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDT_in_packageNameDeclaration629 = new BitSet(new long[]{0x00000003FFFFFFF2L});
    public static final BitSet FOLLOW_IDT_in_packageNameDeclaration633 = new BitSet(new long[]{0x00000003FFFFFFF2L});
    public static final BitSet FOLLOW_27_in_importDeclaration656 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IDT_in_importDeclaration666 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_19_in_importDeclaration668 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_17_in_importDeclaration670 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_importDeclaration672 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_27_in_importDeclaration686 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IDT_in_importDeclaration697 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_19_in_importDeclaration701 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IDT_in_importDeclaration703 = new BitSet(new long[]{0x0000000000180000L});
    public static final BitSet FOLLOW_19_in_importDeclaration710 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_17_in_importDeclaration712 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_importDeclaration718 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_clazzDeclaration_in_clazzOrInterfaceDeclaration751 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_interfaceDeclaration_in_clazzOrInterfaceDeclaration759 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_25_in_clazzDeclaration779 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IDT_in_clazzDeclaration781 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_clazzBody_in_clazzDeclaration810 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_32_in_clazzBody833 = new BitSet(new long[]{0x0000000200100200L});
    public static final BitSet FOLLOW_clazzBodyDeclaration_in_clazzBody845 = new BitSet(new long[]{0x0000000200100200L});
    public static final BitSet FOLLOW_33_in_clazzBody867 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_20_in_clazzBodyDeclaration888 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_memberDecl_in_clazzBodyDeclaration898 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_fieldDeclaration_in_memberDecl919 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_type_in_fieldDeclaration948 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IDT_in_fieldDeclaration950 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_fieldDeclaration952 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_28_in_interfaceDeclaration985 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IDT_in_interfaceDeclaration987 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_interfaceBody_in_interfaceDeclaration1029 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_32_in_interfaceBody1059 = new BitSet(new long[]{0x0000000284100200L});
    public static final BitSet FOLLOW_interfaceBodyDeclaration_in_interfaceBody1071 = new BitSet(new long[]{0x0000000284100200L});
    public static final BitSet FOLLOW_33_in_interfaceBody1093 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_interfaceConstDeclaration_in_interfaceBodyDeclaration1119 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_interfaceMethodDeclaration_in_interfaceBodyDeclaration1127 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_20_in_interfaceBodyDeclaration1137 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_26_in_interfaceConstDeclaration1157 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IDT_in_interfaceConstDeclaration1159 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_21_in_interfaceConstDeclaration1161 = new BitSet(new long[]{0x0000000000000480L});
    public static final BitSet FOLLOW_number_in_interfaceConstDeclaration1163 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_interfaceConstDeclaration1165 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_type_in_interfaceMethodDeclaration1227 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_31_in_interfaceMethodDeclaration1240 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IDT_in_interfaceMethodDeclaration1261 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_formalParameters_in_interfaceMethodDeclaration1274 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_interfaceMethodDeclaration1285 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_15_in_formalParameters1309 = new BitSet(new long[]{0x0000000020010200L});
    public static final BitSet FOLLOW_formalParameterDecls_in_formalParameters1316 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_16_in_formalParameters1325 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_normalParameterDecl_in_formalParameterDecls1345 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_18_in_formalParameterDecls1356 = new BitSet(new long[]{0x0000000020000200L});
    public static final BitSet FOLLOW_normalParameterDecl_in_formalParameterDecls1358 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_29_in_normalParameterDecl1381 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_type_in_normalParameterDecl1385 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IDT_in_normalParameterDecl1387 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDT_in_type1415 = new BitSet(new long[]{0x0000000000800002L});
    public static final BitSet FOLLOW_23_in_type1418 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_type1420 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_22_in_optionDeclaration1439 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_32_in_optionDeclaration1442 = new BitSet(new long[]{0x0000000200000200L});
    public static final BitSet FOLLOW_optionAttribute_in_optionDeclaration1447 = new BitSet(new long[]{0x0000000200000200L});
    public static final BitSet FOLLOW_33_in_optionDeclaration1452 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_optionAttributeName_in_optionAttribute1466 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_21_in_optionAttribute1468 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_optionAttributeValue_in_optionAttribute1470 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_optionAttribute1472 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDT_in_optionAttributeName1482 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDT_in_optionAttributeValue1488 = new BitSet(new long[]{0x0000000000000002L});

}